Creating Web sites bible by David A. Crowder; Andrew Bailey

Creating Web sites bible by David A. Crowder; Andrew Bailey

Author:David A. Crowder; Andrew Bailey
Format: mobi, epub
Tags: World Wide Web, Web sites, Web sites - Design, Internet - Web Site Design, Internet guides & online services, Computers, Web site development, General, Design, Computer - Internet, Internet, Computer Books: Web Programming, Web Page Design, Computing: General, Web - Page Design
ISBN: 9780764574986
Publisher: Wiley Pub.
Published: 2004-12-13T20:00:00+00:00


Part IV

Making It Look Professional

Programming with ActionScript

ActionScript is an object-oriented, scripting language similar to other object languages such as JavaScript and Visual Basic. You can build applications in Flash that interact with the user. Using ActionScript, you can create scripts that respond to a mouse click by displaying a Web site or playing a Flash movie. You can use this powerful tool in the Normal or Expert mode. Adding actions

Using the Normal mode (Window → Development Panels → Actions) provides you with a selection of preset scripts. Clicking the right arrow in the upper right-hand corner of the Actions panel displays a list of options, including the Normal or Expert setting for your ActionScript task. You can choose from options on the Toolbox list, and Flash creates the ActionScript code for you. However, you can edit the code if you want. Using Expert mode, you are required to type code in the text box on the right side of the Action panel.

Basic actions provide a list of built-in actions, and when selected, generate the boilerplate code displayed in the text box. The basic actions for which Flash generates the code are shown in Table 11-8.

TABLE 11-8

Basic Actions in ActionScript Action Panel

Action

Description

Go To

Goes to a frame or scene.

Play

Plays a movie.

Stop

Stops a movie playing.

Toggle High Quality

Adjusts the quality of the movie.

Stop All Sounds

Stops all sounds playing.

Get URL

Displays a URL in a browser.

FSCommand

Controls Flash Player.

Load Movie

Loads and plays a movie from local drive or URL.

Unload Movie

Unloads a loaded movie.

Tell Target

Specify path and control movies.

If Frame Is Loaded

Specifies actions taken if a particular frame is loaded.

On Mouse Event

Identifies actions taken when specified mouse event occurs.

406

Crowder

c11.tex

V2 - 05/27/2008

1:14am

Page 407

Adding Multimedia and Other Objects

11

Once you have begun using ActionScript, you may find that you need to troubleshoot some errors in running the scripts. The script debugger can be launched from Window → Debugger. To debug a movie in Test Movie mode, you select Control → Debug Movie.

Exporting and Publishing Movies

Exporting is different from publishing. Exporting means that you convert your movie (or a frame from it) to a file format other than Flash. Exporting into some formats will not include the sound files in the exported movie. Publishing converts your Flash movie to the Flash Player format. In a sense, it is compiled. All files incorporated into your movie (such as bitmaps and sound) are combined into the Flash Player file.

Exporting movies

You can export your movies just as you imported images into them. Why would you want to export a movie? There are at least two reasons. First, you might want to export a still image from one of the movie’s frames to use in an advertisement or a promotion. Second, you could export your movie to be played in a different player than Flash Player.

Flash exports both still image and animated formats. Images from your movies can be exported as bitmap and vector graphic files. Following are some of the specific formats Flash exports:

■ Bitmap graphic — JPEG, GIF, PNG, BMP, PCD, PICT, PCX, or



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.